#include <iostream>
#include "MyEvent.h"
#include <vector>
#include "MyString.h"
#include <string>
#include <boost/filesystem.hpp>
#include "MyClient.h"
#pragma comment(lib, "libboost_filesystem-vc100-mt-gd-1_51.lib")

using namespace std;
using namespace boost::filesystem;

void func()
{
	MyString s("D:\\test");
	MyClient client;
	client.ConvertDirToTree(s).PrintPreSelf();
	//delete tree;
}

int main()
{
	//for(int i = 0;i < 1000000000; ++i)
	//{
		func();
	//}
	//MyString s;
	//cin >> s;
	//MyClient client;
	//client.ConvertDirToTree(s)->PrintPreSelf();
	//path p((char*)s);   // p reads clearer than argv[1] in the following code

	//try
	//{
	//	if (exists(p))    // does p actually exist?
	//	{
	//		if (is_regular_file(p))        // is p a regular file?   
	//			cout << p << " size is " << file_size(p) << '\n';

	//		else if (is_directory(p))      // is p a directory?
	//		{
	//			cout << p << " is a directory containing:\n";

	//			copy(directory_iterator(p), directory_iterator(), // directory_iterator::value_type
	//				ostream_iterator<directory_entry>(cout, "\n")); // is directory_entry, which is
	//			// converted to a path by the
	//			// path stream inserter
	//		}

	//		else
	//			cout << p << " exists, but is neither a regular file nor a directory\n";
	//	}
	//	else
	//		cout << p << " does not exist\n";
	//}

	//catch (const filesystem_error& ex)
	//{
	//	cout << ex.what() << '\n';
	//}
	return 0;
}
